home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / ms-0_06.lha / bms-0.06 / mspawn.h < prev    next >
C/C++ Source or Header  |  1993-08-06  |  2KB  |  54 lines

  1. /* mspawn.h - define X-independent MandelSpawn state */
  2.    
  3. #ifndef _mspawn_h
  4. #define _mspawn_h
  5.  
  6. #include "ms_job.h"
  7. #include "ms_real.h" /* for "complex" declaration */
  8.  
  9. #ifndef MIN
  10. #define MIN(x,y) ((x) < (y) ? (x) : (y))
  11. #endif
  12. #ifndef MAX
  13. #define MAX(x,y) ((x) > (y) ? (x) : (y))
  14. #endif
  15. #ifndef ABS
  16. #define ABS(x) ((x) < 0 ? -(x) : (x))
  17. #endif
  18.  
  19. /* This is what is stored in the client_data field in the chunk; */
  20. /* basically this contains all the information that is needed to */
  21. /* know what to do when a reply returns from a slave */
  22. typedef struct
  23. { unsigned int configuration;    /* used to check for obsolete replies */
  24.   ms_rectangle s;        /* rectangle being updated */
  25. } ms_client_info;
  26.  
  27. typedef struct ms_state
  28. { unsigned height;
  29.   unsigned width;
  30.   double center_x;        /* x coord. of view center */
  31.   double center_y;        /* y coord. of view center */
  32.   double xrange;        /* real axis interval */
  33.   double yrange;        /* imaginary axis interval */
  34.   int julia;            /* Julia set mode (used as a Bool by Ms.c) */
  35.   double c_x;            /* c value for Julia set only, real part */
  36.   double c_y;            /*   imaginary part */
  37.   unsigned long mi_count;    /* total no. of iterations done */
  38.   struct static_job_info job;    /* buffer for data passed to the slave */
  39.   unsigned bytes_per_count;    /* number of bytes in iteration count */
  40.   unsigned chunks_out;        /* number of chunks being calculated */
  41.   unsigned configuration;    /* serial no. of current setup */
  42.   unsigned chunk_height;    /* height of pixel block */
  43.   unsigned chunk_width;        /* width of pixel block */
  44.   struct wf_state *workforce;    /* pointer to workforce data */
  45.   int show_interior;        /* flag: display interior structure */
  46. } ms_state;
  47.  
  48. void ms_init();
  49. void ms_calculate_job_parameters();
  50. void ms_dispatch_chunk();
  51. void ms_dispatch_rect();
  52.  
  53. #endif /* _mspawn_h */
  54.